new Vue({
    el: '#editor',
    data: {
        input: '# hello',
        // message: "hello",
        title:"",
        description:"",
        status:"false",
        url:""


    },
    computed: {
        compiledMarkdown: function () {
            return marked(this.input, { sanitize: true })
        }
    },
    methods: {
        update: _.debounce(function (e) {
            this.input = e.target.value
        }, 300),
        getData:function () {
            self=this;
            $.post("./articleadd",{title:this.title,description:this.description,content:this.input},function (data) {
                if(data.status=='true')
                {
                    window.location.href="./"+data.url;
                }
                console.log(data);
                self.title=data.title;
                self.description=data.description;
                self.input=data.input;

            })
        },

    }
})